<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <title>{{ report_title }}</title>
    <style>
      @media print {
        body {
          font-family: "Arial", sans-serif;
          line-height: 1.6;
          margin: 2cm;
        }

        h1,
        h2 {
          page-break-before: always;
          color: #2c3e50;
          display: flex;
          align-items: center;
        }

        h1 i,
        h2 i {
          margin-right: 10px;
        }

        table {
          width: 100%;
          border-collapse: collapse;
          margin: 1.5cm 0;
        }

        td,
        th {
          border: 1px solid #ddd;
          padding: 8px;
          text-align: left;
        }

        th {
          background-color: #f4f4f4;
        }

        .page-break {
          page-break-after: always;
          height: 5px;
        }

        .hidden {
          display: none;
        }
      }

      body {
        font-family: "Arial", sans-serif;
        line-height: 1.6;
        margin: 0;
        padding: 0;
        background-color: #ffffff;
      }

      .report-container {
        width: 80%;
        margin: 0 auto;
        padding: 20px;
        background-color: #fff;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
      }

      .cover-img {
        display: block;
        width: 100%;
        max-height: 400px;
        object-fit: cover;
        margin: 0 auto;
      }

      h1 {
        text-align: center;
        margin-top: 20px;
      }

      h2 {
        margin-top: 30px;
        font-size: 1.5em;
        color: #333;
      }

      h2 i {
        color: #3498db;
      }

      table {
        width: 100%;
        border-collapse: collapse;
        margin: 20px 0;
      }

      td,
      th {
        border: 1px solid #ddd;
        padding: 10px;
        text-align: left;
      }

      th {
        background-color: #f0f0f0;
      }

      .table-left-3-right-7 th,
      .table-left-3-right-7 td {
        width: 30%;
      }

      .table-left-3-right-7 td {
        width: 70%;
      }

      .table-left-3-right-7 th:first-child,
      .table-left-3-right-7 td:first-child {
        width: 20%;
      }

      .page-break {
        page-break-after: always;
        height: 5px;
      }

      .hidden {
        display: none;
      }
      h2 {
          page-break-before: avoid;
          page-break-after: avoid;
      }
    </style>
  </head>
  <body>
    <div class="report-container">
      <!-- 报告生成信息 -->
      <h2><i class="fa fa-clock"></i>辅助诊断报告</h2>
      <p>生成时间：{{ generation_time }}</p>

      <!-- 报告内容 -->
      <h2><i class="fa fa-file-alt"></i>报告内容</h2>
      <table class="table-left-3-right-7">
        <tr>
          <th>主诉</th>
          <td>{{ main_suit }}</td>
        </tr>
        <tr>
          <th>现病史</th>
          <td>{{ history_illness }}</td>
        </tr>
        <tr>
          <th>辅助检查</th>
          <td>{{ auxiliary_examination }}</td>
        </tr>
        <tr>
          <th>既往史</th>
          <td>{{ past_history }}</td>
        </tr>
        <tr>
          <th>诊断</th>
          <td>{{ diagnosis }}</td>
        </tr>
        <tr>
          <th>建议</th>
          <td>{{ suggestion }}</td>
        </tr>
      </table>

    </div>
  </body>
</html>
